package com.shd.edanpei.ui.adapter;

import android.content.Context;
import android.text.TextUtils;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shd.edanpei.R;
import com.shd.edanpei.base.BaseQuickImageAdapter;
import com.shd.edanpei.bean.QuitTeamBean;

import de.hdodenhof.circleimageview.CircleImageView;

/**
 * Created by mc on 2019/1/3.
 * yang-wen-wen
 */

public class QuitTeamAdapter extends BaseQuickImageAdapter<QuitTeamBean> {

    public QuitTeamAdapter(Context context) {
        super(context, R.layout.item_quit_team);
    }

    @Override
    protected void convert(BaseViewHolder helper, QuitTeamBean item) {

        helper.setText(R.id.tv_name, item.getUserName())
                .setText(R.id.tv_time, item.getCreateTime())
                .addOnClickListener(R.id.tv_agree);

        if (!TextUtils.isEmpty(item.getAvatarUrl())){
            mLoadImgCtrl.getGlide().load(item.getAvatarUrl()).into((CircleImageView) helper.getView(R.id.iv_head));
        }
    }
}
